package framework.movements;

import org.newdawn.slick.GameContainer;

import framework.BasicFighter;

public class PropulsionMovement extends Movement {
	
	protected int xSpeed;
	
	protected int ySpeed;
	
	protected BasicFighter f; 
	
	public PropulsionMovement(BasicFighter f, int xSpeed, int ySpeed) {
		this.xSpeed = xSpeed;
		this.ySpeed = ySpeed;
		this.f = f;
		setDuration(1000);
		setBlockingTime(getDuration());
	}

	@Override
	public void trigger() {
		super.trigger();
		f.setXspeed(xSpeed);
		f.setYspeed(ySpeed);
	}

	@Override
	public void update(GameContainer gc, int delta) {
		super.update(gc, delta);
		f.getYspeed();
	}

	@Override
	public void interrupt() {
		super.interrupt();
		f.setXspeed(0);
	}
}
